package com.easycarebn.main.adapter;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.easycarebn.main.utils.ItemDr;
import com.timbacsi.main.R;

public class ResultHomeAdapter extends BaseAdapter {
	ViewHolder holder;
	Context mContext;
	List<ItemDr> arr;

	public ResultHomeAdapter(Context mContext, List<ItemDr> arr) {
		this.mContext = mContext;
		this.arr = arr;
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return arr.size();
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return 0;
	}

	public class ViewHolder {
		public TextView title;
		public TextView time;
		public TextView content;
		
		public ImageView icon;

		public Button btnDaxem;
		public Button btnChitiet;
		public Button btnXoa;
		
		
		
		


	}

	@Override
	public View getView(final int position, View convertView, ViewGroup parent) {
		if (convertView == null) {
			// Utilities.log("convert null " + position);
			holder = new ViewHolder();
			convertView = View.inflate(mContext, R.layout.item_search_home,
					null);
			holder.title = (TextView) convertView.findViewById(R.id.lblTitle);

			convertView.setTag(holder);
		} else {
			// Utilities.log("convert not null " + position);
			holder = (ViewHolder) convertView.getTag();
		}

		return convertView;
	}

}
